#pragma once

#ifndef TILE_H
#define TILE_H

#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

struct Tile
{
	RECT rect;
	IDirect3DTexture9* texture;

	Tile()
	{
		rect = RECT();
		texture = 0;
	}

	Tile(RECT rectangle, IDirect3DTexture9* text)
	{
		rect = rectangle;
		texture = text;
	}

	void draw(ID3DXSprite* sprite, D3DXVECTOR3 position)
	{
		sprite->Draw(texture, &rect, 0, &position, D3DCOLOR_XRGB(255, 255, 255));
	}
};

#endif